<template>
    <div id="app">
      <template v-if="!isLoginPage">
        <Layout></Layout>
      </template>
      <template v-else>
        <router-view />
      </template>
    </div>
  </template>
  
  <script>
  import { ref, watch } from 'vue';
  import { useRoute, useRouter } from 'vue-router';
  import Layout from './views/layout/index.vue'

  
  export default {
    name: 'App',
    components: {
        Layout
    },
    setup() {
      const route = useRoute();
      const router = useRouter();
      const isLoginPage = ref(false);
      watch(() => route.path, (newPath) => {
        console.log(newPath, 'newPath')
        isLoginPage.value = newPath === '/login';
      }, { immediate: true });
  
      return {
        isLoginPage,
      };
    }
  };
  </script>
  
  <style>
  </style>
  
